import Vue from "vue";
import VueRouter from "vue-router";
import Default from "../components/default.vue";
import Index from "../components/home/index.vue";
//挂载路由
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: Default,
    redirect: "/index",
    children: [{ path: "/index", component: Index }],
  },
];

const router = new VueRouter({
  mode: "history",
  routes,
});
export default router;
